/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ages.graphics

import com.ages.math.Vector
import javax.media.opengl.GL

object GLDraw {
  case class AtClass(d:()=>Unit){
    def at(v:Vector):OnClass={
      OnClass(v,d)
    }
  }
  case class OnClass(v:Vector,d:()=>Unit){
    def on(gl:GL)
    {
      gl.glPushMatrix
      gl.glTranslated(v.X,v.Y,v.Z)
      d()
      gl.glPopMatrix
    }
  }
  def draw(d:()=>Unit):AtClass={
    AtClass(d)
  }

}







